Skip to content

Conversation

@yruslan
Copy link
Collaborator

@yruslan yruslan commented Sep 10, 2025

Summary by CodeRabbit

  • New Features

    • Added cross-version artifacts for Scala 2.11, 2.12, and 2.13 across key modules.
  • Chores

    • Introduced a new release workflow that publishes artifacts to Maven Central.
    • Upgraded build tooling (including sbt 1.11.6 and updated plugins).
    • Simplified dependency management by removing explicit Guava version pinning/overrides.
    • Removed legacy release and publishing configurations to streamline the build.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Sep 10, 2025

Walkthrough

Adds a new GitHub Actions release workflow, migrates SBT build/release to sbt-ci-release, enables cross-Scala builds in multiple modules, updates SBT version and plugins, removes custom publishing/version settings, and drops Guava-related overrides and dependencies from SBT/Maven configs.

Changes

Cohort / File(s) Summary
CI release workflow
.github/workflows/release2.yaml
New manual-release workflow running sbt ci-release on Ubuntu 22.04 with Java 8, using Sonatype/PGP secrets.
SBT build config updates
build.sbt, publish.sbt, version.sbt
Adds crossScalaVersions to multiple modules; skips publish for some; removes release aliases and publish config; removes global version setting.
SBT infra and plugins
project/plugins.sbt, project/build.properties
Replaces sbt-pgp/sbt-release with sbt-ci-release and sbt-projectmatrix; retains other plugins; bumps SBT from 1.10.11 to 1.11.6.
Dependency overrides cleanup
project/Dependencies.scala, pom.xml, spark-cobol/pom.xml
Removes Guava version/properties and override helpers; drops Guava dependency and compiler plugin config from Maven POMs.

Sequence Diagram(s)

sequenceDiagram
  actor Maintainer
  participant GH as GitHub Actions
  participant Runner as ubuntu-22.04 Runner
  participant SBT as sbt ci-release
  participant Sonatype as Sonatype/Maven Central

  Maintainer->>GH: workflow_dispatch (Release2)
  GH->>Runner: Start job "publish"
  Runner->>Runner: actions/checkout (fetch-depth: 0)
  Runner->>Runner: setup-java (Temurin 8, cache: sbt)
  Runner->>SBT: Run ci-release
  Note over SBT: Uses PGP_PASSPHRASE, PGP_SECRET,<br/>SONATYPE_USERNAME, SONATYPE_PASSWORD
  SBT->>Sonatype: Publish artifacts
  Sonatype-->>SBT: Acknowledgment
  SBT-->>Runner: Exit code
  Runner-->>GH: Job result
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Pre-merge checks (3 passed)

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The title clearly and succinctly conveys the primary change—switching to the new Sonatype deployment—so anyone scanning the history can immediately understand the pull request’s intent.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.

Poem

I thump my paws—release in sight,
A workflow hops at manual light.
Scala paths now threefold wide,
Guava’s leaves drift off the tide.
Keys are signed, the jars take flight—
To Maven meadows, through the night.
Hop, ship, delight! 🐇✨

✨ Finishing Touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feature/784-switch-to-new-sonatype-deployment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions
Copy link

JaCoCo code coverage report - 'cobol-parser'

Overall Project 91.71% 🍏

There is no coverage information present for the Files changed

@github-actions
Copy link

JaCoCo code coverage report - 'spark-cobol'

There is no coverage information present for the Files changed

Total Project Coverage 79.79% 🍏

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🧹 Nitpick comments (7)
project/build.properties (1)

1-1: Confirm JDK 8 vs sbt 1.11.6 compatibility and align CI JVM.

Docs state sbt runs on JDK 8+. Your workflow uses Java 8, so this should be fine, but verify plugins (assembly, shading, jacoco, scoverage) under JDK 8 with sbt 1.11.6 to avoid CI surprises. (scala-sbt.org)

If you plan to move CI to JDK 11/17 later, call it out now to keep build reproducibility across local and CI.

project/plugins.sbt (1)

3-3: scoverage 1.6.0 is quite old—verify compatibility across 2.11/2.12/2.13.

Staying on 1.x may be intentional for Scala 2.11 support; still, please confirm it works with sbt 1.11.6. If you consider upgrading later, check Scala 2.11 support first.

.github/workflows/release2.yaml (2)

34-37: Re-check Java 8 choice with sbt 1.11.6 and your plugins.

sbt supports JDK 8+, but some plugins/libs occasionally require newer JDKs. Keep Java 8 if you need Scala 2.11; otherwise consider 11/17. (scala-sbt.org, docs.scala-lang.net)


39-44: Secrets are fine; add a brief safety net.

Consider gating the publish step to tags to avoid accidental snapshot publishes from manual runs. Works together with dynver/tag trigger. (github.com)

-      - name: Build and release to Sonatype and Maven Central
-        run: sbt ci-release
+      - name: Build and release to Sonatype and Maven Central
+        if: startsWith(github.ref, 'refs/tags/v')
+        run: sbt ci-release
build.sbt (3)

55-55: Avoid repeating crossScalaVersions per-module.

You already set ThisBuild / crossScalaVersions at Line 29; per-module duplication is redundant unless a module diverges. Simplify to reduce maintenance.

-    crossScalaVersions := List(scala211, scala212, scala213),
+    // inherits ThisBuild / crossScalaVersions

Repeat similarly for cobol-parser, cobol-converters, spark-cobol.

Also applies to: 70-70, 88-88, 100-100


60-60: Redundant publish disabling.

publishArtifact := false plus empty publish/publishLocal already prevent publication. publish / skip := true is extra; consider removing for clarity.

-    publish / skip := true,

Also applies to: 93-93


156-156: Jar name will include dynver format.

Once dynver is added, version may contain '+' for non-tag builds; if that’s undesirable in filenames, normalize it (e.g., replace '+' with '-'). (github.com)

-  assembly / assemblyJarName := s"${name.value}_${scalaBinaryVersion.value}_${sparkVersionShort(scalaVersion.value)}-${version.value}-bundle.jar",
+  assembly / assemblyJarName := s"${name.value}_${scalaBinaryVersion.value}_${sparkVersionShort(scalaVersion.value)}-${version.value.replace('+','-')}-bundle.jar",
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 0731745 and 4f23e00.

📒 Files selected for processing (9)
  • .github/workflows/release2.yaml (1 hunks)
  • build.sbt (3 hunks)
  • pom.xml (0 hunks)
  • project/Dependencies.scala (0 hunks)
  • project/build.properties (1 hunks)
  • project/plugins.sbt (1 hunks)
  • publish.sbt (0 hunks)
  • spark-cobol/pom.xml (0 hunks)
  • version.sbt (0 hunks)
💤 Files with no reviewable changes (5)
  • version.sbt
  • spark-cobol/pom.xml
  • publish.sbt
  • project/Dependencies.scala
  • pom.xml
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (5)
  • GitHub Check: Spark 3.5.5 on Scala 2.13.16
  • GitHub Check: Spark 2.4.8 on Scala 2.11.12
  • GitHub Check: Spark 3.5.5 on Scala 2.12.20
  • GitHub Check: Spark 3.4.4 on Scala 2.12.20
  • GitHub Check: test (2.12.20, 2.12, 3.3.4, 0, 80, 20)

Comment on lines +19 to +21
on:
workflow_dispatch:

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Trigger releases on tags to publish non-SNAPSHOTs.

ci-release expects tag-driven versions (with dynver). Add a push tag trigger so “vX.Y.Z” runs a release. (github.com)

 on:
-  workflow_dispatch:
+  workflow_dispatch:
+  push:
+    tags:
+      - "v*"
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
on:
workflow_dispatch:
on:
workflow_dispatch:
push:
tags:
- "v*"
🤖 Prompt for AI Agents
In .github/workflows/release2.yaml around lines 19 to 21, the workflow is only
triggered by workflow_dispatch but needs a push tag trigger so ci-release runs
for version tags; update the on: section to include a push trigger for tag
patterns (e.g. push: tags: - 'v*.*.*') alongside workflow_dispatch so pushes of
vX.Y.Z tags will run the release workflow.

Comment on lines +1 to +6
addSbtPlugin("com.github.sbt" % "sbt-ci-release" % "1.11.1")
addSbtPlugin("com.eed3si9n" % "sbt-projectmatrix" % "0.9.2")
addSbtPlugin("org.scoverage" % "sbt-scoverage" % "1.6.0")
addSbtPlugin("de.heikoseeberger" % "sbt-header" % "5.2.0")
addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "0.15.0")
addSbtPlugin("io.get-coursier" % "sbt-shading" % "2.1.5")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Missing sbt-dynver: ci-release won’t produce proper release versions from tags.

You removed version.sbt; without sbt-dynver, version defaults to 0.1.0-SNAPSHOT, so ci-release will only publish snapshots. Add dynver so tags drive release versions. (github.com)

Apply:

+addSbtPlugin("com.github.sbt"    % "sbt-dynver"        % "5.1.0")
 addSbtPlugin("com.github.sbt"    % "sbt-ci-release"    % "1.11.1")
 addSbtPlugin("com.eed3si9n"      % "sbt-projectmatrix" % "0.9.2")
 addSbtPlugin("org.scoverage"     % "sbt-scoverage"     % "1.6.0")
 addSbtPlugin("de.heikoseeberger" % "sbt-header"        % "5.2.0")
 addSbtPlugin("com.eed3si9n"      % "sbt-assembly"      % "0.15.0")
 addSbtPlugin("io.get-coursier"   % "sbt-shading"       % "2.1.5")
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
addSbtPlugin("com.github.sbt" % "sbt-ci-release" % "1.11.1")
addSbtPlugin("com.eed3si9n" % "sbt-projectmatrix" % "0.9.2")
addSbtPlugin("org.scoverage" % "sbt-scoverage" % "1.6.0")
addSbtPlugin("de.heikoseeberger" % "sbt-header" % "5.2.0")
addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "0.15.0")
addSbtPlugin("io.get-coursier" % "sbt-shading" % "2.1.5")
// project/plugins.sbt
addSbtPlugin("com.github.sbt" % "sbt-dynver" % "5.1.0")
addSbtPlugin("com.github.sbt" % "sbt-ci-release" % "1.11.1")
addSbtPlugin("com.eed3si9n" % "sbt-projectmatrix" % "0.9.2")
addSbtPlugin("org.scoverage" % "sbt-scoverage" % "1.6.0")
addSbtPlugin("de.heikoseeberger" % "sbt-header" % "5.2.0")
addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "0.15.0")
addSbtPlugin("io.get-coursier" % "sbt-shading" % "2.1.5")
🤖 Prompt for AI Agents
In project/plugins.sbt around lines 1 to 6, the sbt-dynver plugin is missing so
CI release will keep publishing 0.1.0-SNAPSHOT; add the sbt-dynver plugin to
plugins.sbt (use the latest stable dynver version) so versions are derived from
Git tags, and remove any hardcoded version.sbt or ensure it does not override
dynver-generated versions; after adding the plugin, run sbt reload and verify
that sbt dynver or sbt show version returns a tag-derived version before relying
on ci-release.

@yruslan yruslan merged commit 373324c into master Sep 10, 2025
8 checks passed
@yruslan yruslan deleted the feature/784-switch-to-new-sonatype-deployment branch September 10, 2025 12:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants